/**
 * This example demonstrates the Toolbar's two different modes of handling overflow:
 *
 * - "menu": buttons that don't fit on the toolbar are rendered into an overflow menu
 * - "scroller": scroller buttons are rendered on either side of the toolbar for scrolling
 * overflowing items into view.
 */
Ext.define('DragonApp.view.resource.Bar', {
    extend: 'Ext.toolbar.Toolbar',
    xtype: 'resource-bar',

    items: [{
        xtype: 'button',
        text: '上传图像',
        itemId: 'upload',
        tooltip: '添加图像',
        handler: 'onUpload',
        iconCls: 'x-fa fa-cloud-upload',
        width: 100
    }, {
        xtype: 'button',
        text: '批量删除',
        itemId: 'batdelete',
        tooltip: '批量删除',
        handler: 'onBatDelete',
        glyph: 'xf014@FontAwesome',
        width: 100
    }, '->', {
        xtype: 'textfield',
        name: 'searchfield',
        itemId: 'search_field',
        emptyText: '请输入筛选关键字',
        listeners: {
            specialKey: 'onTextFieldSpecialKeySearch'
        }
    }, {
        xtype: 'button',
        itemId: 'search_btn',
        text: '搜索',
        reference: 'search',
        iconCls: 'fa fa-search fa-lg buttonIcon',
        listeners: {
            click: 'onSearch'
        }
    }]
});